<script>
export default {
  name: "headCom",
  data(){
    return {
      num:0,
    }
  }
}
</script>

<template>
<div>
  <header>
    这是头部组件
    {{num}}
    <button @click="num++">点击</button>
  </header>
</div>
</template>

<style scoped lang="less">
header{
  width:1200px;
  margin: auto;
  background-color: red;
  height: 300px;
}
</style>